package modelos;

import java.beans.PropertyChangeSupport;
import modelos.enums.Formato;

/**
 *
 * @author luis
 */
public class Copia {

    public static final String PROP_ID = "PROP_ID";
    public static final String PROP_PELICULA = "PROP_PELICULA";
    public static final String PROP_ESTATUS = "PROP_ESTATUS";
    public static final String PROP_FORMATO = "PROP_FORMATO";

    private int id;
    private String pelicula;
    private String estatus;
    private Formato formato;

    public Copia() {
        this.formato = Formato.DVD;
    }

    public Copia(int id, String pelicula, String estatus, Formato formato) {
        this.id = id;
        this.pelicula = pelicula;
        this.estatus = estatus;
        this.formato = formato;
    }

    /**
     * @return the id
     */
    public int getId() {
        return id;
    }

    /**
     * @param id the id to set
     */
    public void setId(int id) {
        int oldId = this.id;
        this.id = id;
        propertyChangeSupport.firePropertyChange(PROP_ID, oldId, id);
    }

    /**
     * @return the pelicula
     */
    public String getPelicula() {
        return pelicula;
    }

    /**
     * @param pelicula the pelicula to set
     */
    public void setPelicula(String pelicula) {
        java.lang.String oldPelicula = this.pelicula;
        this.pelicula = pelicula;
        propertyChangeSupport.firePropertyChange(PROP_PELICULA, oldPelicula, pelicula);
    }

    /**
     * @return the estatus
     */
    public String getEstatus() {
        return estatus;
    }

    /**
     * @param estatus the estatus to set
     */
    public void setEstatus(String estatus) {
        java.lang.String oldEstatus = this.estatus;
        this.estatus = estatus;
        propertyChangeSupport.firePropertyChange(PROP_ESTATUS, oldEstatus, estatus);
    }

    /**
     * @return the formato
     */
    public Formato getFormato() {
        return formato;
    }

    /**
     * @param formato the formato to set
     */
    public void setFormato(Formato formato) {
        modelos.enums.Formato oldFormato = this.formato;
        this.formato = formato;
        propertyChangeSupport.firePropertyChange(PROP_FORMATO, oldFormato, formato);
    }
    private final transient PropertyChangeSupport propertyChangeSupport = new java.beans.PropertyChangeSupport(this);

}
